#ifndef __BITBOARDS_H
#define __BITBOARDS_H
#include <stdint.h>

typedef uint64_t bitboard;

/* initialisation des pieces blanches */
#define WHITE_P 0xFF00
#define WHITE_T 0x0081
#define WHITE_B 0x0042
#define WHITE_C 0x0024
#define WHITE_Q 0x0008
#define WHITE_K 0x0010
/* initialisation des pieces blanches */
#define BLACK_P (WHITE_P<<40)

/* deplacement et attaque des pawns */
static inline bitboard deplace_pawn_white1( bitboard );
static inline bitboard deplace_pawn_white2( bitboard );
static inline bitboard deplace_pawn_black1( bitboard );
static inline bitboard deplace_pawn_black2( bitboard );
static inline bitboard attack_pawn_white_r( bitboard );
static inline bitboard attack_pawn_white_l( bitboard );
static inline bitboard attack_pawn_black_r( bitboard );
static inline bitboard attack_pawn_black_l( bitboard );
/* deplacement et attaque des tours*/
static inline bitboard deplace_rook_r( bitboard, size_t );
static inline bitboard deplace_rook_l( bitboard, size_t );
static inline bitboard deplace_rook_b( bitboard, size_t );
static inline bitboard deplace_rook_f( bitboard, size_t );
/* deplacement et attaque des fous */
static inline bitboard deplace_bishop_br( bitboard, size_t );
static inline bitboard deplace_bishop_bl( bitboard, size_t );
static inline bitboard deplace_bishop_fr( bitboard, size_t );
static inline bitboard deplace_bishop_fl( bitboard, size_t );
/* deplacement et attaque des cavaliers */
static inline bitboard deplace_knight_br( bitboard, size_t );
static inline bitboard deplace_knight_bl( bitboard, size_t );
static inline bitboard deplace_knight_fr( bitboard, size_t );
static inline bitboard deplace_knight_fl( bitboard, size_t );
static inline bitboard deplace_knight_rb( bitboard, size_t );
static inline bitboard deplace_knight_lb( bitboard, size_t );
static inline bitboard deplace_knight_rf( bitboard, size_t );
static inline bitboard deplace_knight_lf( bitboard, size_t );
/* deplacement et attaque de la reine */
static inline bitboard deplace_queen_r( bitboard, size_t );
static inline bitboard deplace_queen_l( bitboard, size_t );
static inline bitboard deplace_queen_b( bitboard, size_t );
static inline bitboard deplace_queen_f( bitboard, size_t );
static inline bitboard deplace_queen_br( bitboard, size_t );
static inline bitboard deplace_queen_bl( bitboard, size_t );
static inline bitboard deplace_queen_fr( bitboard, size_t );
static inline bitboard deplace_queen_fl( bitboard, size_t );
/* deplacement et attaque du roi */
static inline bitboard deplace_king_l( bitboard );
static inline bitboard deplace_king_r( bitboard );
static inline bitboard deplace_king_b( bitboard );
static inline bitboard deplace_king_f( bitboard );
static inline bitboard deplace_king_br( bitboard );
static inline bitboard deplace_king_bl( bitboard );
static inline bitboard deplace_king_fr( bitboard );
static inline bitboard deplace_king_fl( bitboard );
/* fonction d'affichage de l'echiquier */
void print_ech ( bitboard );

#endif
